using System.Collections.Generic;
using System.Threading.Tasks;
using JGSY.CMS.LowCode.Platform.Domain.Entities;

namespace JGSY.CMS.LowCode.Platform.Domain.Interfaces
{
    /// <summary>
    /// 安全事件仓储接口
    /// 提供安全事件的数据访问操作，支持安全监控和事件记录管理功能
    /// </summary>
    public interface ISecurityEventRepository
    {
        /// <summary>
        /// 获取所有安全事件记录
        /// </summary>
        /// <returns>安全事件实体列表</returns>
        Task<IEnumerable<SecurityEvent>> GetAllAsync();
        
        /// <summary>
        /// 根据ID获取安全事件记录
        /// </summary>
        /// <param name="id">安全事件标识符</param>
        /// <returns>安全事件实体，如果未找到则返回null</returns>
        Task<SecurityEvent?> GetByIdAsync(long id);
        
        /// <summary>
        /// 添加新的安全事件记录
        /// </summary>
        /// <param name="entity">要添加的安全事件实体</param>
        /// <returns>添加操作任务</returns>
        Task AddAsync(SecurityEvent entity);
        
        /// <summary>
        /// 更新安全事件记录
        /// </summary>
        /// <param name="id">安全事件标识符</param>
        /// <param name="entity">更新后的安全事件实体</param>
        /// <returns>更新操作任务</returns>
        Task UpdateAsync(long id, SecurityEvent entity);
        
        /// <summary>
        /// 删除安全事件记录
        /// </summary>
        /// <param name="id">安全事件标识符</param>
        /// <returns>删除操作任务</returns>
        Task DeleteAsync(long id);
    }
}
